package com.blb.redis.controller;

import com.blb.redis.entity.User;
import com.blb.redis.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lvtian
 * @date 2023/2/2 17:05
 */
@RestController
public class UserController {
    @Autowired
    private IUserService userService;
    @RequestMapping("/user/{id}")
    public User getById(@PathVariable Long id){
        return userService.getUserById(id);
    }

}
